package com.google.code.ptrends.common.entities;

import java.util.Calendar;
import java.util.Date;

public class SessionEvent {

	private int id;
	private EventType status;
	private String name;
	private String description;
	private Date eventDate;
	private Session session;

	public SessionEvent(){
		eventDate = Calendar.getInstance().getTime();
	}
	
	public void setId(final int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setStatus(final EventType status) {
		this.status = status;
	}

	public EventType getStatus() {
		return status;
	}

	public void setName(final String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setDescription(final String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setEventDate(final Date eventDate) {
		if (eventDate == null) {
			throw new IllegalArgumentException(
					"Illegal null-reference eventDate");
		}

		this.eventDate = new Date(eventDate.getTime());
	}

	public Date getEventDate() {
		return eventDate == null ? null : new Date(eventDate.getTime());
	}

	public void setSession(Session session) {
		this.session = session;
	}

	public Session getSession() {
		return session;
	}

}
